package org.ftc.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "MOTION")
// @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Motion extends BasicEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -347089505864325801L;

	@Id
	@Column(name = "MOTION_SEQ", length = 50)
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	private String motionSeq;
	// 案號
	@Column(name = "MOTION_NO", length = 8)
	private String motionNo;
	// 會期
	@ManyToOne
	@JoinColumn(name = "SESSION_NO", nullable = false)
	private Session session;
	@Transient
	private String sessionNo;
	// 案別名
	@Column(name = "TYPE", length = 10)
	private String type;
	// 案別
	@Column(name = "TYPE_NO", length = 1)
	private String typeNo;
	// 臨時
	@Column(name = "PROVISIONAL")
	private boolean provisional;
	// 案次
	@Column(name = "MOTION_ORDER", length = 2)
	private String motionOrder;
	// 案由
	@Column(name = "CAUSE", length = 200)
	private String cause;
	// 決議
	// @Lob
	@Column(name = "RESOLUTION")
	private String resolution;
	// 附帶決議
	// @Lob
	@Column(name = "SUB_RESOLUTION")
	private String subResolution;
	// 單位別
	@Column(name = "UNIT_CODE", length = 2)
	private String unitCode;
	// 提案單位
	@Column(name = "UNIT_NAME", length = 20)
	private String unitName;
	// tel no
	@Column(name = "TEL_NO", length = 50)
	private String telNo;
	// 承辦人
	@Column(name = "IN_CHARGE", length = 20)
	private String inCharge;
	// 科長
	@Column(name = "SECTION_CHIEF", length = 20)
	private String sectionChief;
	// 負責本案之審查委員
	@Column(name = "EXAMINANT", length = 200)
	private String examinant;
	// 收文日期
	@Temporal(TemporalType.DATE)
	@Column(name = "DATE1")
	private Date date1;
	// 到議事科日期
	@Temporal(TemporalType.DATE)
	@Column(name = "DATE2")
	private Date date2;
	// 是否違法/第幾條
	@Column(name = "isLegal", length = 200)
	private String isLegal;
	// 罰鍰額度
	@Column(name = "FINE", length = 10)
	private String fine;
	// 其他處分
	@Column(name = "DISCIPLINE", length = 200)
	private String discipline;
	// 原單位別1
	@Column(name = "UNIT_CODE1", length = 2)
	private String unitCode1;
	// 原提案單位1
	@Column(name = "UNIT_NAME1", length = 20)
	private String unitName1;
	// tel no
	@Column(name = "TEL_NO1", length = 50)
	private String telNo1;
	// 原承辦人1
	@Column(name = "IN_CHARGE1", length = 20)
	private String inCharge1;
	// 原科長1
	@Column(name = "SECTION_CHIEF1", length = 20)
	private String sectionChief1;
	// 原單位別2
	@Column(name = "UNIT_CODE2", length = 2)
	private String unitCode2;
	// tel no
	@Column(name = "TEL_NO2", length = 50)
	private String telNo2;
	// 原提案單位2
	@Column(name = "UNIT_NAME2", length = 20)
	private String unitName2;
	// 原承辦人2
	@Column(name = "IN_CHARGE2", length = 20)
	private String inCharge2;
	// 原科長2
	@Column(name = "SECTION_CHIEF2", length = 20)
	private String sectionChief2;

	public String getMotionSeq() {
		return motionSeq;
	}

	public void setMotionSeq(String motionSeq) {
		this.motionSeq = motionSeq;
	}

	public String getMotionNo() {
		return motionNo;
	}

	public void setMotionNo(String motionNo) {
		this.motionNo = motionNo;
	}

	public Session getSession() {
		return session;
	}

	public void setSession(Session session) {
		this.session = session;
	}

	public String getSessionNo() {
		return sessionNo;
	}

	public void setSessionNo(String sessionNo) {
		this.sessionNo = sessionNo;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getTypeNo() {
		return typeNo;
	}

	public void setTypeNo(String typeNo) {
		this.typeNo = typeNo;
	}

	public boolean isProvisional() {
		return provisional;
	}

	public void setProvisional(boolean provisional) {
		this.provisional = provisional;
	}

	public String getMotionOrder() {
		return motionOrder;
	}

	public void setMotionOrder(String motionOrder) {
		this.motionOrder = motionOrder;
	}

	public String getCause() {
		return cause;
	}

	public void setCause(String cause) {
		this.cause = cause;
	}

	public String getResolution() {
		return resolution;
	}

	public void setResolution(String resolution) {
		this.resolution = resolution;
	}

	public String getSubResolution() {
		return subResolution;
	}

	public void setSubResolution(String subResolution) {
		this.subResolution = subResolution;
	}

	public String getUnitCode() {
		return unitCode;
	}

	public void setUnitCode(String unitCode) {
		this.unitCode = unitCode;
	}

	public String getUnitName() {
		return unitName;
	}

	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}

	public String getTelNo() {
		return telNo;
	}

	public void setTelNo(String telNo) {
		this.telNo = telNo;
	}

	public String getInCharge() {
		return inCharge;
	}

	public void setInCharge(String inCharge) {
		this.inCharge = inCharge;
	}

	public String getSectionChief() {
		return sectionChief;
	}

	public void setSectionChief(String sectionChief) {
		this.sectionChief = sectionChief;
	}

	public String getExaminant() {
		return examinant;
	}

	public void setExaminant(String examinant) {
		this.examinant = examinant;
	}
	
	public Date getDate1() {
		return date1;
	}

	public void setDate1(Date date1) {
		this.date1 = date1;
	}

	public Date getDate2() {
		return date2;
	}

	public void setDate2(Date date2) {
		this.date2 = date2;
	}

	public String getIsLegal() {
		return isLegal;
	}

	public void setIsLegal(String isLegal) {
		this.isLegal = isLegal;
	}

	public String getFine() {
		return fine;
	}

	public void setFine(String fine) {
		this.fine = fine;
	}

	public String getDiscipline() {
		return discipline;
	}

	public void setDiscipline(String discipline) {
		this.discipline = discipline;
	}

	public String getUnitCode1() {
		return unitCode1;
	}

	public void setUnitCode1(String unitCode1) {
		this.unitCode1 = unitCode1;
	}

	public String getUnitName1() {
		return unitName1;
	}

	public void setUnitName1(String unitName1) {
		this.unitName1 = unitName1;
	}

	public String getTelNo1() {
		return telNo1;
	}

	public void setTelNo1(String telNo1) {
		this.telNo1 = telNo1;
	}

	public String getInCharge1() {
		return inCharge1;
	}

	public void setInCharge1(String inCharge1) {
		this.inCharge1 = inCharge1;
	}

	public String getSectionChief1() {
		return sectionChief1;
	}

	public void setSectionChief1(String sectionChief1) {
		this.sectionChief1 = sectionChief1;
	}

	public String getUnitCode2() {
		return unitCode2;
	}

	public void setUnitCode2(String unitCode2) {
		this.unitCode2 = unitCode2;
	}

	public String getUnitName2() {
		return unitName2;
	}

	public void setUnitName2(String unitName2) {
		this.unitName2 = unitName2;
	}

	public String getTelNo2() {
		return telNo2;
	}

	public void setTelNo2(String telNo2) {
		this.telNo2 = telNo2;
	}

	public String getInCharge2() {
		return inCharge2;
	}

	public void setInCharge2(String inCharge2) {
		this.inCharge2 = inCharge2;
	}

	public String getSectionChief2() {
		return sectionChief2;
	}

	public void setSectionChief2(String sectionChief2) {
		this.sectionChief2 = sectionChief2;
	}

}
